
<!DOCTYPE html>
<html>
<head>
  <meta charset="utf-8">
  <title>登录</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
  <meta name="keywords" content="fly,layui,前端社区">
  <meta name="description" content="Fly社区是模块化前端UI框架Layui的官网社区，致力于为web开发提供强劲动力">
  <link rel="stylesheet" href="{{static('js/user/layui.css')}}">
  <link rel="stylesheet" href="{{static('js/user/global.css')}}">
    <script src="{{static('js/user/jquery-3.3.1.min.js')}}"></script>
    <script src="{{static('js/user/layui.js')}}"></script>
    <script src="{{static('js/user/jwt.js')}}"></script>
</head>
<body>

<div class="layui-container fly-marginTop">
  <div class="fly-panel fly-panel-user" pad20>
    <div class="layui-tab layui-tab-brief" lay-filter="user">
      <ul class="layui-tab-title">
        <li class="layui-this" style="color: #bf2c24">登录</li>
        <li><a href="/reg">注册</a></li>
      </ul>
      <div class="layui-form layui-tab-content" id="LAY_ucm" style="padding: 20px 0;">
        <div class="layui-tab-item layui-show">
          <div class="layui-form layui-form-pane">
            <form method="post" class="login">
              <div class="layui-form-item">
                <label for="L_email" class="layui-form-label">手机号/邮箱</label>
                    <input type="hidden" id="csrf_toke" value="{{ csrf_token  }}">
                <div class="layui-input-inline">
                  <input type="text" id="L_email" name="email" required lay-verify="required" autocomplete="off" class="layui-input">
                </div>
              </div>
              <div class="layui-form-item">
                <label for="L_pass" class="layui-form-label">密码</label>
                <div class="layui-input-inline">
                  <input type="password" id="L_pass" name="pass" required lay-verify="required" autocomplete="off" class="layui-input">
                </div>
              </div>
              <div class="layui-form-item">
                <label for="L_vercode" class="layui-form-label">验证码</label>
                <div class="layui-input-inline">
                  <input type="text" id="L_vercode" name="vercode" required lay-verify="required" placeholder="请输入验证码" autocomplete="off" class="layui-input">

                </div>
                <div class="layui-form-mid">
                  <img src="" id="img" class="get_pic_code" onclick="generateImageCode()">
                    <input hidden value="" id="image_token">
                </div>
              </div>
              <div class="layui-form-item">
                <span class="layui-btn" lay-filter="*" lay-submit style="background-color: #bf2c24" onclick="login()">立即登录</span>
                <span style="padding-left:20px;">
                  <a href="/forget/">忘记密码？</a>
                </span>
              </div>
              <input id="image_token" hidden value="">

               <br>
                <p>第三方快速登录</p>
                <br>
                            <a href="/qq_login">
						<img src="{{static('images/img3/3.jpg')}}" style="width: 20px"></a>
                        &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
               <a href="/wx_login">
						<img class="d6" src="{{static('images/img3/4.jpg')}}" style="width: 20px;"></a>

            </form>
          </div>
        </div>
      </div>
    </div>
  </div>
</div>

<div class="fly-footer"><p>
    <p>    <a href="/">回到首页</a></p>
    <a href="/" target="_blank">xx小说</a>
    <a href="http://www.layui.com/template/fly/" target="_blank">xx音乐</a>
    <a href="http://fly.layui.com/jie/2461/" target="_blank">推荐云</a>
  </p>
</div>

<script>
        // 1. 生成一个编号
    // 严格一点的使用uuid保证编号唯一， 不是很严谨的情况下，也可以使用时间戳
    imageCodeId = generateUUID();

    // 2. 拼接验证码地址
    var imageCodeUrl = "/image_code/?code_id=" + imageCodeId + "/";
    // 3. 设置页面中图片验证码img标签的src属性
    $(".get_pic_code").attr("src", imageCodeUrl);
    $("#image_token").attr("value", imageCodeId);
layui.cache.page = 'user';
layui.cache.user = {
  username: '游客'
  ,uid: -1
  ,avatar: 'res/images/avatar/00.jpg'
  ,experience: 83
  ,sex: '男'
};
layui.config({
  base: 'static/res/mods/'
}).extend({
  fly: 'index'
}).use('fly');
</script>

</body>
</html>